
void mem_sort();
void mem_used(u32 base, u32 length, u32 type);
void mem_init(struct multiboot* mb);
void mem_done();
void mem_print_map();

/*
    * Type 1: Usable (normal) RAM
    * Type 2: Reserved - unusable
    * Type 3: ACPI reclaimable memory
    * Type 4: ACPI NVS memory
    * Type 5: Area containing bad memory
    
    * Type 16: Kernel
    * Type 17: multiboot
    * Type 18: module
*/

#define MULTIBOOT_TYPE 0x100 | 0
#define MODULE_TYPE 0x100 | 1
#define ELF_TYPE 0x100 | 2
#define KERNEL_TYPE 0x100 | 10

#define INVAILD_TYPE 0
#define FREE_TYPE 1
#define RESV_TYPE 2
#define APCI_RECL_TYPE 3
#define ACPI_NVS_TYPE 4
#define BADMEM_TYPE 5

